package com.qh.util;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.MessageFormat;
import java.util.Properties;

public class SqlUtil {

	private static Properties properties;

	static {
		try {
			properties = new Properties();
			properties.load(new InputStreamReader(
					SqlUtil.class.getClassLoader().getResourceAsStream("sql.properties"), "UTF-8"));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static String getProperty(String key, String[] arguments) {
		
		return MessageFormat.format(properties.getProperty(key), arguments);
	}

}
